package cn.audit.repository.approval;

import cn.audit.bean.pojo.Approval;
import cn.audit.bean.dto.zuzhangzhengshuai;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: 钟琪
 * @Date: 2019/5/29 15:52
 */
public interface ApprovalRepository extends JpaRepository<Approval,Long>,JpaSpecificationExecutor<Approval> {

    @Query("select new cn.audit.bean.dto.zuzhangzhengshuai(u,a)" +
            "from Approval a,User u " +
            "where a.handler=u.id ")
    public List<zuzhangzhengshuai> eee();
}
